import { observable, action } from 'mobx-miniprogram';

export const store = observable({
    lang: 'zh',
    updateLang: action(function(l) {
      const original = wx.getStorageSync('lang')
      wx.setStorageSync('lang', l)
      if(original != l) {
        wx.vibrateShort({
          type: 'type',
        })  
      }
      this.lang = l;
    })
})
